<template>
    <div class="bo">
        <div :class="['bo-item',`b-${index}`]" v-for="(p,index) in list" :key="index" @click="choose(index)">
            <img :src="publicUrl(p.url)" />
            <span>{{transl(p.title) }}</span>
        </div>
    </div>
</template>
    
<script setup lang='ts'>
import { reactive } from 'vue';
import { publicUrl } from "@/utils/index"
import { LangStore } from "@/stores/modules/lang"
const { transl } = LangStore()

const list = reactive<{url:string;title:string}[]>([
    {url:"/img/phone.png",title:"咨询电话"},
    {url:"/img/edit.png",title:"预约报名"},
])
const emits = defineEmits(['show'])
const choose = (index:number)=>{
    if (index === 0) {
        window.location.href = "tel:85264058277"
    }else {
        emits('show')
    }
}
</script>
    
<style scoped lang="scss">
@import "./index.scss";
</style>